package com.suse.spring_boot_fast.controller;

import com.suse.spring_boot_fast.entity.GitHubUser;
import com.suse.spring_boot_fast.mapper.GitUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Autowired
    GitUserMapper gitUserMapper;

    @GetMapping("/user/{id}")
    public GitHubUser ListUser(@PathVariable("id" ) int id){
        GitHubUser list= gitUserMapper.List(id);
        return list;
    }
}
